<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowProfileForms.aspx.cs" Inherits="Private_My_Profile_ShowProfileForms" %>
<%@ Register TagPrefix="Flux" Namespace="Deepcode.Flux.Core.UI.Controls" Assembly="Deepcode.Flux.Core" %>
<html>
<head runat="server">
	<link href="../../../Asset/Style/GeneralStyle.css" rel="stylesheet" type="text/css" />
</head>
<body class="nopad">
<form id="form1" runat="server">
<Flux:HostTable runat="server">

<!-- FORM 1 -->
<Flux:ValidationSummarySection runat="server" HeaderText="Please correct the following errors" ValidationGroup="form1"/>
<Flux:Section runat="server" Title="Your details">
<Flux:ShadePadBox runat="server">
	<table cellspacing="0" cellpadding="5" border="0" width="500">
	<tr><td>Name: <%=Required%></td>
		<td><asp:TextBox runat="server" ID="RealName" Width="250px" style="width:250px;"/></td>
	</tr>
	<tr><td>Email: <%=Required%></td>
		<td><asp:TextBox Runat="server" ID="EmailAddress" Width="250px" style="width:250px"/></td>
	</tr>
	</table>
</Flux:ShadePadBox>
</Flux:Section>

<!-- Validators for form 1 -->
<asp:RequiredFieldValidator runat="server" ControlToValidate="RealName" ErrorMessage="You must specify your name" Display="None" ValidationGroup="form1"/>
<asp:RequiredFieldValidator Runat="server" ControlToValidate="EmailAddress" ErrorMessage="You must specify the users email address" Display="None" ValidationGroup="form1"/>
<asp:RegularExpressionValidator ID="EmailRE" Runat="server" ControlToValidate="EmailAddress" ErrorMessage="The email address does not appear to be valid" Display="None" ValidationGroup="form1"/>
<asp:CustomValidator ID="EmailExists" Runat="server" ControlToValidate="EmailAddress" ErrorMessage="The email address is already registered on this system" Display="None" ValidationGroup="form1"/>

<!-- Content Management Settings -->
<Flux:CollapseSection runat="server" Title="Content and Asset Management">
<Flux:ShadePadBox runat="server">
    <table cellspacing="0" cellpadding="5" border="0">
    <tr><td>Content item mode:</td>
        <td><asp:RadioButton runat="server" GroupName="CIM" ID="cimTitleOnly" Text="Title Only" Checked="True"/></td>
        <td><asp:RadioButton runat="server" GroupName="CIM" ID="cimNameOnly" Text="Name Only"/></td>
        <td><asp:RadioButton runat="server" GroupName="CIM" ID="cimBoth" Text="Title and Name"/></td>
        </tr>
    </table>
</Flux:ShadePadBox>
</Flux:CollapseSection>

<!-- Taskpad settings -->
<Flux:CollapseSection runat="server" Title="Disable taskpad items">
<Flux:ShadePadBox runat="server">
	<asp:TreeView runat="server" ID="_taskpadtree" ShowLines="true"></asp:TreeView>
</Flux:ShadePadBox>
</Flux:CollapseSection>

<!-- Update button for all forms -->
<Flux:Section runat="server">
<Flux:PadBox CssClass="Pad5Button" runat="server">
	<asp:Button runat="server" ID="btnUpdate" UseSubmitBehavior=false Text="Update details" OnClick="btnUpdateClick" ValidationGroup="form1"/>
	<asp:Label runat="server" ID="labUpdated" CssClass="SafeLink" Visible="false" Text="&nbsp;&nbsp;&nbsp;Your profile has been updated"/>
</Flux:PadBox>
</Flux:Section>

<!-- FORM 2 -->
<Flux:ValidationSummarySection runat="server" HeaderText="Please correct the following errors" ValidationGroup="form2"/>
<Flux:Section runat="server" Title="Change your password">
<Flux:ShadePadBox runat="server">
	<table cellspacing="0" cellpadding="5" border="0" width="300">
    <tr><td>Old Password: <%=Required%></td>
        <td><asp:TextBox runat="server" ID="OldPassword" Width="100px" style="width:100px;" TextMode="Password"/></td>
    </tr>
	<tr><td>New Password: <%=Required%></td>
		<td><asp:TextBox runat="server" ID="Password1" Width="100px" style="width:100px;" TextMode="Password"/></td>
	</tr>
	<tr><td>Confirm new password: <%=Required%></td>
		<td><asp:TextBox Runat="server" ID="Password2" Width="100px" style="width:100px;" Textmode="Password"/></td>
	</tr>
	</table>
</Flux:ShadePadBox>
</Flux:Section>

<Flux:Section runat="server">
<Flux:PadBox CssClass="Pad5Button" runat="server">
	<asp:Button runat="server" ID="btnSetPassword" UseSubmitBehaviour=false Text="Set new password" OnClick="btnSetPasswordClick" ValidationGroup="form2"/>
	<asp:Label runat="server" ID="labUpdatedPassword" CssClass="SafeLink" Visible="false" Text="&nbsp;&nbsp;&nbsp;Your password has been updated"/>
</Flux:PadBox>
</Flux:Section>

<!-- Validators for form 2 -->
<asp:RequiredFieldValidator runat="server" ControlToValidate="Password1" ErrorMessage="You must specify a new password" Display="None" ValidationGroup="form2"/>
<asp:RequiredFieldValidator runat="server" ControlToValidate="OldPassword" ErrorMessage="Your old password is incorrect" Display="None" ValidationGroup="form2"/>
<asp:CustomValidator ID="OldPasswordOK" runat="server" ControlToValidate="OldPassword" ErrorMessage="Your old password is incorrect" Display="None" ValidationGroup="form2"/>
<asp:CustomValidator ID="PasswordMin5" Runat="server" ControlToValidate="Password1" ErrorMessage="Passwords must be a minimum of 5 characters long" Display="None" ValidationGroup="form2"/>
<asp:CustomValidator ID="PasswordsMatch" Runat="server" ControlToValidate="Password1" ErrorMessage="Password and Confirm Password must match" Display="None" ValidationGroup="form2"/>



</Flux:HostTable>
</form>
</body>